package com.waitingresult.designpattern.behavioral.template.demo2;

import com.waitingresult.designpattern.domain.UserEntity;

/**
 * @Author: WangShuai
 * @CreateTime: 2022-11-15  22:34
 * @Description:
 * - 1. AbsWorkingTemplate.working() 约定了模板方法的执行顺序
 * - 2. WorkingTemplate1/2 实现了抽象方法调用模板方法的working()
 * @Version: 1.0
 */
public class WorkingMain {
    public static void main(String[] args) {
        UserEntity zhangsan = new UserEntity("张三");
        UserEntity list = new UserEntity("李四");
        AbsWorkingTemplate workingTemplateImpl1 = new WorkingTemplateImpl1();
        workingTemplateImpl1.working(zhangsan);
        AbsWorkingTemplate workingTemplateImpl2 = new WorkingTemplateImpl2();
        workingTemplateImpl2.working(list);
    }
}
